package edu.spec.wfl.week08.class2.book.unit4.one;

public class Cylinder extends Circle {
    private double height;

    public Cylinder(double r, double height) {
        super(r);
        this.height = height;
    }

    public double getVolume(){
        double volume = height*getArea();
        return volume;
    }

    public void showVolume(){
        System.out.println(getVolume());
    }

    public static void main(String[] args) {
        Circle c = new Circle(2.2);
        c.show();
        Cylinder cy = new Cylinder(2.3, 1.5);
        cy.showVolume();
    }
}
